<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>js template</title>
	<script type="text/javascript">
		var tpl = "hi angular is <%info%>,is a good <%info2%>;";
								 // /<%([^%>]+)?%>
		var data = { info: "javascript lib", info23: "bucuo"}
		var result = tpl.replace(/<%([^%>]+)?%>/g,function(arg0, arg1){
			return data[arg1];
		});
		console.log(result);
	</script>
</head>
<body>
	
</body>
</html>